Changeset 2941


Ignore:
Timestamp:
Apr 14, 2023, 5:49:58 PM (20 months ago)
Author:
romain.vande
Message:

Mars Dynamico : Adapt routines to the new version of Dynamico and the subslope parametrization.

Location:
trunk/LMDZ.MARS
Files:
1 added
2 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/phymars/xios_output_mod.F90

    r2545 r2941  
    2727  USE regular_lonlat_mod, ONLY: lon_reg, lat_reg
    2828  USE nrtype, ONLY: pi
     29  use comslope_mod, ONLY: nslope,def_slope_mean
    2930#ifdef CPP_XIOS
    3031  USE xios
     
    6263    CALL xios_set_axis_attr("soil_layers", n_glo=size(mlayer), value=mlayer,&
    6364                            unit="m",positive="down")
     65    IF (prt_level>=10) WRITE(lunout,*) "initialize_xios_output: call xios_set_axis_attr for subslope"
     66    CALL xios_set_axis_attr("subslope", n_glo=nslope, value=def_slope_mean,&
     67                            unit="degree",positive="up")
    6468   
    6569    ! 2. Declare horizontal domain
  • trunk/LMDZ.MARS/util/startarchive2icosa/README

    r2813 r2941  
    66Run a dynamico simulation (with startphy_file=false for example) with the desired resolution to get
    77start.nc and startfi.nc. These files will be used as reference (rename as *_ref.nc) in the script.
    8 You can use the files named *_no_start to have an example of callphys etc to run without startfiles
     8You can use the files named *_no_start to have an example of files to run without startfiles
    99
    1010Job_mpi is the file you need to run start_archive2icosa on Occigen
  • trunk/LMDZ.MARS/util/startarchive2icosa/compile

    r2813 r2941  
    11#!/usr/bin/bash
    22
    3 source ../../../../../trunk_Dynamico/trunk/XIOS/arch.env
    4 source ../../../../../trunk_Dynamico/trunk/XIOS/arch.path
     3source ../../../XIOS/arch.env
     4source ../../../XIOS/arch.path
    55
    66mpif90 -g -traceback start_archive2icosa.f90 \
    77$NETCDF_INCDIR $NETCDF_LIBDIR $NETCDF_LIB \
    88$HDF5_INCDIR $HDF5_LIBDIR $HDF5_LIB \
    9 -I ../../../../../trunk_Dynamico/trunk/XIOS/inc \
    10 -L ../../../../../trunk_Dynamico/trunk/XIOS/lib -lxios -lstdc++ \
     9-I ../../../XIOS/inc \
     10-L ../../../XIOS/lib -lxios -lstdc++ \
    1111-o start_archive2icosa
    1212
     
    1414$NETCDF_INCDIR $NETCDF_LIBDIR $NETCDF_LIB \
    1515$HDF5_INCDIR $HDF5_LIBDIR $HDF5_LIB \
    16 -I ../../../../../trunk_Dynamico/trunk/XIOS/inc \
    17 -L ../../../../../trunk_Dynamico/trunk/XIOS/lib -lxios -lstdc++ \
     16-I ../../../XIOS/inc \
     17-L ../../../XIOS/lib -lxios -lstdc++ \
    1818-o rearrange_startphy
    1919
  • trunk/LMDZ.MARS/util/startarchive2icosa/icosa_finalize.bash

    r2813 r2941  
    77# load nco module
    88module purge
    9 source /scratch/cnt0027/lmd1167/adelavois/models/code/XIOS/arch.env #You have to adapt to your own path
     9source ../trunk/XIOS/arch.env #You have to adapt to your own path
    1010#module load nco/4.7.9-gcc-4.8.5-hdf5-1.8.18-openmpi-2.0.4 #Example of version of the module needed
    1111module load nco
     
    1818ncrename -v lon,longitude -v lat,latitude -d cell,physical_points\
    1919         startphy_icosa_nc3.nc startphy_nc3.nc
    20 # Temporarily added because program is not yet able to read topography
    21 # SSO parameters are now taken from a dedicated startarchive.nc
    22 # see start2archive_SSO.f90
    23 #ncks -A -v albedodat,ZMEA,ZSTD,ZSIG,ZGAM,ZTHE \
    24 #         startphy_icosa_ref.nc startphy_nc3.nc
    2520#Temporay soildepth array from Dynamico restartfi
    26 ncks -A -v soildepth \
    27          ../../mars_dynamico_update_basic/startfi_0.nc startphy_nc3.nc #You have to adapt to your own path
     21ncks -A -v soildepth restartfi.nc startphy_nc3.nc #You have to adapt to your own path
     22ncks -A -v subslope_dist restartfi.nc startphy_nc3.nc
     23ncks -A -v def_slope restartfi.nc startphy_nc3.nc
    2824
    2925nccopy -k 4 startphy_nc3.nc startfi.nc
    3026
    3127#Temporary Time variable from start2archive; should be added with xios
    32 #ncks -A -v Time \
    33 #         start_archive_nc4.nc startfi.nc
    3428ncks -O -x -v time_counter startfi.nc startfi.nc_tmp
    3529ncks -A -v Time start.nc startfi.nc_tmp
     30ncks -A -v flux_geo restartfi.nc startfi.nc_tmp
     31ncks -A -v wstar restartfi.nc startfi.nc_tmp
     32ncks -A -v hmons restartfi.nc startfi.nc_tmp
     33ncks -A -v summit restartfi.nc startfi.nc_tmp
     34ncks -A -v base restartfi.nc startfi.nc_tmp
    3635cp startfi.nc_tmp startfi.nc
    3736
    38 rearrange_startphy > rearrange_startphy.out 2>&1
     37./rearrange_startphy > rearrange_startphy.out 2>&1
    3938
    4039# make a proper start.nc file based on start_icosa.nc
     
    5150     start_icosa_ref.nc start_icosa.nc
    5251
     52ncks -A -v W,geopot,q,nq start_icosa_ref.nc start_icosa.nc
     53
    5354# In the current version of Dynamico, the variable q for tracer is needed but unused.
    5455# To create this unused variable simply run this short python code
    5556
    56 #import numpy as np
    57 #import netCDF4 as nc
    58 
    59 #fn = 'start_icosa.nc'
    60 #ds = nc.Dataset(fn, 'a', format='NETCDF4')
    61 #nq = ds.createDimension('nq', 7)
    62 
    63 #q = ds.createVariable('q', 'f8', ('nq','lev', 'cell_mesh',))
    64 #nqq = ds.createVariable('nq', 'f8', ('nq',))
    65 #q[:,:,:]=0.
    66 #q.online_operation = "once"
    67 #q.coordinates = "lat lon"
    68 #ds.close()
    69 
    7057# cleanup
    7158rm -rf startphy_icosa_nc3.nc startphy_nc3.nc
  • trunk/LMDZ.MARS/util/startarchive2icosa/iodef.xml

    r2906 r2941  
    1111      <!-- 2D fields -->
    1212      <field id="ps_clean" />
     13      <!-- orography fields -->
     14      <field id="ZMEA_clean" />
     15      <field id="ZSTD_clean" />
     16      <field id="ZSIG_clean" />
     17      <field id="ZGAM_clean" />
     18      <field id="ZTHE_clean" />
     19      <field id="albedodat_clean" />
     20      <field id="z0_clean" />
     21    </field_group>
     22   
     23    <field_group  id="fields_2D_dst_subslope" grid_ref="src_grid_regular_clean_subslope" >
     24      <!-- 2D fields -->
    1325      <field id="tsurf_clean" />
    14       <!--<field id="co2ice_clean" />-->
    1526      <field id="emis_clean" />
    1627      <!-- 2D fields associated to tracers-->
     
    2233      <field id="h2o_ice_surf_clean" />
    2334      <field id="h2o_vap_surf_clean" />
    24       <!-- orography fields -->
    25       <field id="ZMEA_clean" />
    26       <field id="ZSTD_clean" />
    27       <field id="ZSIG_clean" />
    28       <field id="ZGAM_clean" />
    29       <field id="ZTHE_clean" />
    30       <field id="albedodat_clean" />
    31       <field id="z0_clean" />
     35      <field id="stormdust_number_surf_clean" />
     36      <field id="stormdust_mass_surf_clean" />
     37      <field id="topdust_number_surf_clean" />
     38      <field id="topdust_mass_surf_clean" />
    3239    </field_group>
    3340    <!-- -->
     
    5057      <field id="h2o_ice_clean" grid_ref="src_grid_regular_clean" />
    5158      <field id="h2o_vap_clean" grid_ref="src_grid_regular_clean" />
     59      <field id="stormdust_number_clean" grid_ref="src_grid_regular_clean" />
     60      <field id="stormdust_mass_clean" grid_ref="src_grid_regular_clean" />
     61      <field id="topdust_number_clean" grid_ref="src_grid_regular_clean" />
     62      <field id="topdust_mass_clean" grid_ref="src_grid_regular_clean" />
    5263      <!-- soil -->
    53       <field id="tsoil_clean" grid_ref="src_grid_soil_clean" />
    5464      <field id="inertiedat_clean" grid_ref="src_grid_soil_clean" />
    5565      <!-- q2 -->
    5666      <field id="q2_clean" grid_ref="src_grid_regular_p1_clean" />
     67    </field_group>
     68   
     69    <field_group  id="fields_dst_subslope" grid_ref="src_3d_grid_regular_clean_subslope">
     70      <!-- from topography file -->
     71      <field id="tsoil_clean"  />
    5772    </field_group>
    5873   
     
    6984                      operation="instant" >
    7085          <field id="src_ps" name="ps" />
    71           <!--field id="src_phis" name="phisinit" /-->
    72           <field id="src_tsurf" name="tsurf" />
    73           <!--<field id="src_co2ice" name="co2ice" />/-->
    74           <field id="src_emis" name="emis" />
    7586          <field id="src_q2surf" name="q2surf" />
    76           <!--2D fields associated with tracers-->
    77           <field id="src_co2_surf" name="co2_surf" />
    78           <field id="src_dust_number_surf" name="dust_number_surf" />
    79           <field id="src_dust_mass_surf" name="dust_mass_surf" />
    80           <field id="src_ccn_number_surf" name="ccn_number_surf" />
    81           <field id="src_ccn_mass_surf" name="ccn_mass_surf" />
    82           <field id="src_h2o_ice_surf" name="h2o_ice_surf" />
    83           <field id="src_h2o_vap_surf" name="h2o_vap_surf" />
    8487          <!--Subscale Orography-->
    8588          <field id="src_ZMEA" name="ZMEA" />
     
    9194          <field id="src_z0" name="z0" />
    9295         </field_group>
     96         
     97         <field_group freq_offset="1ts"
     98                      grid_ref="src_grid_regular_subslope"
     99                      operation="instant" >
     100          <field id="src_tsurf" name="tsurf" />
     101          <field id="src_emis" name="emis" />
     102          <!--2D fields associated with tracers-->
     103          <field id="src_co2_surf" name="co2_surf" />
     104          <field id="src_dust_number_surf" name="dust_number_surf" />
     105          <field id="src_dust_mass_surf" name="dust_mass_surf" />
     106          <field id="src_ccn_number_surf" name="ccn_number_surf" />
     107          <field id="src_ccn_mass_surf" name="ccn_mass_surf" />
     108          <field id="src_h2o_ice_surf" name="h2o_ice_surf" />
     109          <field id="src_h2o_vap_surf" name="h2o_vap_surf" />
     110          <field id="src_stormdust_number_surf" name="stormdust_number_surf" />
     111          <field id="src_stormdust_mass_surf" name="stormdust_mass_surf" />
     112          <field id="src_topdust_number_surf" name="topdust_number_surf" />
     113          <field id="src_topdust_mass_surf" name="topdust_mass_surf" />
     114         </field_group>
    93115         <!-- 3D fields -->
    94116          <field id="src_temp" name="temp" freq_offset="1ts"
     
    126148                 grid_ref="src_grid_regular"
    127149                 operation="instant" />
     150          <field id="src_trac8" name="stormdust_number" freq_offset="1ts"
     151                 grid_ref="src_grid_regular"
     152                 operation="instant" />
     153          <field id="src_trac9" name="stormdust_mass" freq_offset="1ts"
     154                 grid_ref="src_grid_regular"
     155                 operation="instant" />
     156          <field id="src_trac10" name="topdust_number" freq_offset="1ts"
     157                 grid_ref="src_grid_regular"
     158                 operation="instant" />
     159          <field id="src_trac11" name="topdust_mass" freq_offset="1ts"
     160                 grid_ref="src_grid_regular"
     161                 operation="instant" />
    128162         <!-- soil fields -->
    129163          <field id="src_tsoil" name="tsoil" freq_offset="1ts"
    130                  grid_ref="src_grid_soil"
     164                 grid_ref="src_grid_soil_subslope"
    131165                 operation="instant" />
    132166          <field id="src_inertiedat" name="inertiedat" freq_offset="1ts"
     
    184218                 grid_ref="dst_grid_unstructured"
    185219                 operation="once" />
     220          <field field_ref="stormdust_number_clean" name="stormdust_number"
     221                 grid_ref="dst_grid_unstructured"
     222                 operation="once" />
     223          <field field_ref="stormdust_mass_clean" name="stormdust_mass"
     224                 grid_ref="dst_grid_unstructured"
     225                 operation="once" />
     226          <field field_ref="topdust_number_clean" name="topdust_number"
     227                 grid_ref="dst_grid_unstructured"
     228                 operation="once" />
     229          <field field_ref="topdust_mass_clean" name="topdust_mass"
     230                 grid_ref="dst_grid_unstructured"
     231                 operation="once" />
    186232        </file>
    187233        <file id="startfi_prefinalize" name="startfi_prefinalize" >
    188234         <!-- 2D fields -->
    189          <field_group domain_ref="dst_domain_unstructured"
     235         <field_group grid_ref="dst_grid_unstructured_subslope"
    190236                      operation="once" >
    191237          <field field_ref="tsurf_clean" name="tsurf" />
    192           <!--<field field_ref="co2ice_clean" name="co2ice" />-->
    193238          <field field_ref="emis_clean" name="emis" />
    194239         <!-- 2D fields associated to tracers -->
     
    200245          <field field_ref="h2o_ice_surf_clean" name="h2o_ice" />
    201246          <field field_ref="h2o_vap_surf_clean" name="h2o_vap" />
     247          <field field_ref="stormdust_number_surf_clean" name="stormdust_number" />
     248          <field field_ref="stormdust_mass_surf_clean" name="stormdust_mass" />
     249          <field field_ref="topdust_number_surf_clean" name="topdust_number" />
     250          <field field_ref="topdust_mass_surf_clean" name="topdust_mass" />
     251          </field_group>
    202252         <!-- Topo -->
     253         <field_group domain_ref="dst_domain_unstructured"
     254                      operation="once" >
    203255          <field field_ref="topo" name="phisfi" />
    204256          <field field_ref="ZMEA_clean" name="ZMEA" />
     
    212264         <!-- soil fields -->
    213265          <field field_ref="tsoil_clean" name="tsoil"
    214                  grid_ref="dst_grid_soil_unstructured"
     266                 grid_ref="dst_grid_soil_unstructured_subslope"
    215267                 operation="once" />
    216268          <field field_ref="inertiedat_clean" name="inertiedat"
     
    233285     <axis id="nq" name="nq" />
    234286     <axis id="soil_layers" name="subsurface_layers" />
     287     <axis id="subslope" name="subslope" />
    235288   </axis_definition>
    236289
     
    261314        <axis axis_ref="lev" />
    262315      </grid>
     316      <grid id="src_grid_regular_subslope">
     317        <domain domain_ref="src_domain_regular" />
     318        <axis axis_ref="subslope" />
     319      </grid>
     320      <grid id="src_grid_regular_clean_subslope">
     321        <domain domain_ref="src_domain_regular_clean" />
     322        <axis axis_ref="subslope" />
     323      </grid>
    263324      <grid id="src_grid_regular_clean">
    264325        <domain domain_ref="src_domain_regular_clean" />
     
    277338        <domain domain_ref="src_domain_regular" />
    278339        <axis axis_ref="soil_layers" />
     340      </grid>
     341      <grid id="src_grid_soil_subslope">
     342        <domain domain_ref="src_domain_regular" />
     343        <axis axis_ref="soil_layers" />
     344        <axis axis_ref="subslope" />
     345      </grid>
     346      <grid id="src_3d_grid_regular_clean_subslope">
     347        <domain domain_ref="src_domain_regular_clean" />
     348        <axis axis_ref="soil_layers" />
     349        <axis axis_ref="subslope" />
    279350      </grid>
    280351      <grid id="src_grid_soil_clean">
     
    289360        <axis axis_ref="lev" />
    290361      </grid>
     362      <grid id="dst_grid_unstructured_subslope">
     363        <domain domain_ref="dst_domain_unstructured" />
     364        <axis axis_ref="subslope" />
     365      </grid>
    291366      <grid id="dst_p1_grid_unstructured">
    292367        <domain domain_ref="dst_domain_unstructured" />
     
    301376        <domain domain_ref="dst_domain_unstructured" />
    302377        <axis axis_ref="soil_layers" />
     378      </grid>
     379      <grid id="dst_grid_soil_unstructured_subslope">
     380        <domain domain_ref="dst_domain_unstructured" />
     381        <axis axis_ref="soil_layers" />
     382        <axis axis_ref="subslope" />
    303383      </grid>
    304384    </grid_group>
  • trunk/LMDZ.MARS/util/startarchive2icosa/rearrange_startphy.f90

    r2532 r2941  
    66
    77INTEGER :: ncid
    8 INTEGER :: dimids(4)
     8INTEGER :: dimids(9)
    99INTEGER :: varid
    1010INTEGER :: ierr
     
    1212INTEGER :: ndim
    1313CHARACTER(LEN=100) :: varname
    14 INTEGER :: varname_dimids(5)
     14INTEGER :: varname_dimids(9)
    1515
    1616INTEGER :: i,j,k,nb_cells,nlev,nsoil,nvertex,nlev_p1
     17
     18INTEGER :: physical_points, subslope, index_, inter_slope, subsurface_layer, lev_p1, Time, nslope     
     19
    1720INTEGER,ALLOCATABLE :: cell_index(:)
    1821REAL,ALLOCATABLE :: ref_lon(:)
     
    2528REAL,ALLOCATABLE :: ref_field_soil(:,:),field_soil(:,:)
    2629REAL,ALLOCATABLE :: ref_field_vertex(:,:),field_vertex(:,:)
     30REAL,ALLOCATABLE :: ref_field_subslope(:,:),field_subslope(:,:)
     31REAL,ALLOCATABLE :: ref_field_soil_subslope(:,:,:),field_soil_subslope(:,:,:)
    2732REAL :: lati,loni
    2833REAL :: diff_lat,diff_lon
     
    121126  ! load, rearrange and write variables
    122127  ierr=NF90_INQ_DIMID(ncid,"physical_points",dimids(1))
    123   ierr=NF90_INQ_DIMID(ncid,"lev",dimids(2))
    124   ierr=NF90_INQUIRE_DIMENSION(ncid, dimids(2), len=nlev)
    125   ierr=NF90_INQ_DIMID(ncid,"subsurface_layers",dimids(3))
    126   ierr=NF90_INQUIRE_DIMENSION(ncid, dimids(3), len=nsoil)
    127   ierr=NF90_INQ_DIMID(ncid,"nvertex",dimids(4))
    128   ierr=NF90_INQUIRE_DIMENSION(ncid, dimids(4), len=nvertex)
    129   ierr=NF90_INQ_DIMID(ncid,"lev_p1",dimids(5))
    130   ierr=NF90_INQUIRE_DIMENSION(ncid, dimids(2), len=nlev_p1)
     128  ierr=NF90_INQUIRE_DIMENSION(ncid, dimids(1), len=physical_points)
     129  ierr=NF90_INQ_DIMID(ncid,"nvertex",dimids(2))
     130  ierr=NF90_INQUIRE_DIMENSION(ncid, dimids(2), len=nvertex)
     131  ierr=NF90_INQ_DIMID(ncid,"subslope",dimids(3))
     132  ierr=NF90_INQUIRE_DIMENSION(ncid, dimids(3), len=subslope)
     133  ierr=NF90_INQ_DIMID(ncid,"index",dimids(4))
     134  ierr=NF90_INQUIRE_DIMENSION(ncid, dimids(4), len=index_)
     135  ierr=NF90_INQ_DIMID(ncid,"inter_slope",dimids(5))
     136  ierr=NF90_INQUIRE_DIMENSION(ncid, dimids(5), len=inter_slope)
     137  ierr=NF90_INQ_DIMID(ncid,"subsurface_layers",dimids(6))
     138  ierr=NF90_INQUIRE_DIMENSION(ncid, dimids(6), len=subsurface_layer)
     139  ierr=NF90_INQ_DIMID(ncid,"lev_p1",dimids(7))
     140  ierr=NF90_INQUIRE_DIMENSION(ncid, dimids(7), len=lev_p1)
     141  ierr=NF90_INQ_DIMID(ncid,"Time",dimids(8))
     142  ierr=NF90_INQUIRE_DIMENSION(ncid, dimids(8), len=Time)
     143  ierr=NF90_INQ_DIMID(ncid,"nslope",dimids(9))
     144  ierr=NF90_INQUIRE_DIMENSION(ncid, dimids(9), len=nslope)
    131145  ierr=NF90_INQUIRE(ncid,nVariables=nvar)
     146 
     147
     148!  ierr=NF90_INQ_DIMID(ncid,"lev",dimids(2))
     149!  ierr=NF90_INQUIRE_DIMENSION(ncid, dimids(2), len=nlev)
     150!  ierr=NF90_INQ_DIMID(ncid,"subsurface_layers",dimids(3))
     151!  ierr=NF90_INQUIRE_DIMENSION(ncid, dimids(3), len=nsoil)
     152!  ierr=NF90_INQ_DIMID(ncid,"nvertex",dimids(4))
     153!  ierr=NF90_INQUIRE_DIMENSION(ncid, dimids(4), len=nvertex)
     154!  ierr=NF90_INQ_DIMID(ncid,"lev_p1",dimids(5))
     155!  ierr=NF90_INQUIRE_DIMENSION(ncid, dimids(2), len=nlev_p1)
     156
    132157  write(*,*) "nvar=",nvar
    133   allocate(ref_field(nb_cells),field(nb_cells))
    134   allocate(ref_field_3D(nb_cells,nlev),field_3D(nb_cells,nlev))
    135   allocate(ref_field_3D_p1(nb_cells,nlev_p1),field_3D_p1(nb_cells,nlev_p1))
    136   allocate(ref_field_soil(nb_cells,nsoil),field_soil(nb_cells,nsoil))
    137   allocate(ref_field_vertex(nvertex,nb_cells),field_vertex(nvertex,nb_cells))
     158  allocate(ref_field(physical_points),field(physical_points))
     159  allocate(ref_field_3D_p1(physical_points,lev_p1),field_3D_p1(physical_points,lev_p1))
     160  allocate(ref_field_subslope(physical_points,subslope),field_subslope(physical_points,subslope))
     161  allocate(ref_field_soil(physical_points,subsurface_layer),field_soil(physical_points,subsurface_layer))
     162  allocate(ref_field_vertex(nvertex,physical_points),field_vertex(nvertex,physical_points))
     163  allocate(ref_field_soil_subslope(physical_points,subsurface_layer,subslope),field_soil_subslope(physical_points,subsurface_layer,subslope))
    138164  write(*,*) "dimids :", dimids
     165 
    139166  ! loop over variables:
    140167  do k=1,nvar
    141168    varname_dimids(:)=0
    142169    ierr=NF90_INQUIRE_VARIABLE(ncid,k,name=varname,ndims=ndim,dimids=varname_dimids)
    143       write(*,*) "name: ",trim(varname),"; dimensions:",varname_dimids
     170      write(*,*) "name: ",trim(varname),";ndim=",ndim,"; dimensions:",varname_dimids
    144171    if (ierr /= nf90_noerr) then
    145172      write(*,*) "error for variable k=",k
     
    159186      ierr=NF90_PUT_VAR(ncid,varid,field)
    160187
    161     ! Processing 3D variables : bounds_lon and bounds_lat
    162     else if ((ndim==2).and.(varname_dimids(1)==dimids(4))) then
     188    ! Processing vertex variables : bounds_lon and bounds_lat
     189    else if ((ndim==2).and.(varname_dimids(1)==dimids(2))) then
    163190      write(*,*) "processing ",trim(varname)
    164191      ! load field_3D
     
    174201      ierr=NF90_PUT_VAR(ncid,varid,field_vertex)
    175202      if (ierr /= nf90_noerr) print*,"error putvar ",trim(varname)
    176  
     203     
     204    ! Processing 3D variables : subslope
     205    else if ((ndim==2).and.(varname_dimids(2)==dimids(3))) then
     206      write(*,*) "processing ",trim(varname)
     207      ! load field_3D
     208      ierr=NF90_INQ_VARID(ncid,varname,varid)
     209      if (ierr /= nf90_noerr) print*,"error inqvarid ",trim(varname)
     210      ierr=NF90_GET_VAR(ncid,varid,ref_field_subslope)
     211      if (ierr /= nf90_noerr) print*,"error get_var ",trim(varname)
     212      ! rearrange field_3D
     213      do i=1,nb_cells
     214        field_subslope(cell_index(i),:)=ref_field_subslope(i,:)
     215      enddo
     216      ! write field_3D
     217      ierr=NF90_PUT_VAR(ncid,varid,field_subslope)
     218      if (ierr /= nf90_noerr) print*,"error putvar ",trim(varname)
     219
    177220    ! Processing 3D variables : altitude
    178     else if ((ndim==2).and.(varname_dimids(2)==dimids(2))) then
    179       write(*,*) "processing ",trim(varname)
    180       ! load field_3D
    181       ierr=NF90_INQ_VARID(ncid,varname,varid)
    182       if (ierr /= nf90_noerr) print*,"error inqvarid ",trim(varname)
    183       ierr=NF90_GET_VAR(ncid,varid,ref_field_3D)
    184       if (ierr /= nf90_noerr) print*,"error get_var ",trim(varname)
    185       ! rearrange field_3D
    186       do i=1,nb_cells
    187         field_3D(cell_index(i),:)=ref_field_3D(i,:)
    188       enddo
    189       ! write field_3D
    190       ierr=NF90_PUT_VAR(ncid,varid,field_3D)
     221    else if ((ndim==2).and.(varname_dimids(2)==dimids(7))) then
     222      write(*,*) "processing ",trim(varname)
     223      ! load field_3D
     224      ierr=NF90_INQ_VARID(ncid,varname,varid)
     225      if (ierr /= nf90_noerr) print*,"error inqvarid ",trim(varname)
     226      ierr=NF90_GET_VAR(ncid,varid,ref_field_3D_p1)
     227      if (ierr /= nf90_noerr) print*,"error get_var ",trim(varname)
     228      ! rearrange field_3D
     229      do i=1,nb_cells
     230        field_3D_p1(cell_index(i),:)=ref_field_3D_p1(i,:)
     231      enddo
     232      ! write field_3D
     233      ierr=NF90_PUT_VAR(ncid,varid,field_3D_p1)
    191234      if (ierr /= nf90_noerr) print*,"error putvar ",trim(varname)
    192235
    193236    ! Processing 3D variables : soil
    194     else if ((ndim==2).and.(varname_dimids(2)==dimids(3))) then
     237    else if ((ndim==2).and.(varname_dimids(2)==dimids(6))) then
    195238      write(*,*) "processing ",trim(varname)
    196239      ! load field_soil
     
    207250      if (ierr /= nf90_noerr) print*,"error putvar ",trim(varname)
    208251
    209     ! Processing 3D variables : q2 with lev_p1 as vertical axis
    210     else if ((ndim==2).and.(varname_dimids(2)==dimids(5))) then
    211       write(*,*) "processing ",trim(varname)
    212       ! load field_3D
    213       ierr=NF90_INQ_VARID(ncid,varname,varid)
    214       if (ierr /= nf90_noerr) print*,"error inqvarid ",trim(varname)
    215       ierr=NF90_GET_VAR(ncid,varid,ref_field_3D_p1)
    216       if (ierr /= nf90_noerr) print*,"error get_var ",trim(varname)
    217       ! rearrange field_3D
    218       do i=1,nb_cells
    219         field_3D_p1(cell_index(i),:)=ref_field_3D_p1(i,:)
    220       enddo
    221       ! write field_3D
    222       ierr=NF90_PUT_VAR(ncid,varid,field_3D_p1)
    223       if (ierr /= nf90_noerr) print*,"error putvar ",trim(varname)
     252    ! Processing 3D variables : tsoil
     253    else if ((ndim==3).and.(varname_dimids(3)==dimids(3))) then
     254      write(*,*) "processing ",trim(varname)
     255      ! load field_3D
     256      ierr=NF90_INQ_VARID(ncid,varname,varid)
     257      if (ierr /= nf90_noerr) print*,"error inqvarid ",trim(varname)
     258      ierr=NF90_GET_VAR(ncid,varid,ref_field_soil_subslope)
     259      if (ierr /= nf90_noerr) print*,"error get_var ",trim(varname)
     260      ! rearrange field_3D
     261      do i=1,nb_cells
     262        field_soil_subslope(cell_index(i),:,:)=ref_field_soil_subslope(i,:,:)
     263      enddo
     264      ! write field_3D
     265      ierr=NF90_PUT_VAR(ncid,varid,field_soil_subslope)
     266      if (ierr /= nf90_noerr) print*,"error putvar ",trim(varname)
     267    else
     268      print *, "Nothing to do with ", trim(varname), " ndim=", ndim, " varname_dimids(:)=", varname_dimids(:)
     269
    224270    endif
    225271  enddo
  • trunk/LMDZ.MARS/util/startarchive2icosa/run_icosa.def_no_start

    r2813 r2941  
    1 #INCLUDEDEF=saturn_const.def
    21
    3 ##mpi_threading_mode=serialized
    4 #mpi_threading_mode=funneled
     2#---------------- Mesh ----------------
    53
    6 #halo_i=0
    7 #halo_j=1
    8 # ------------------------------- Mesh ---------------------------------
     4# Number of subdivisions on a main triangle : integer (default=40)
     5nbp = 60
    96
    10 # Number of subdivision on a main triangle (nbp) : integer (default=40)
    11 #nbp=160
    12 nbp=20
     7# Number of vertical layers : integer (default=19)
     8llm = 54
    139
    14 # Earth as reference ?
    15 # nbp                 20  40  80 160
    16 # T-edge length (km) 500 250 120  60
    17 
    18 ## sub splitting of main rhombus : integer (default=1)
    19 #nsplit_i=1
    20 #nsplit_j=1
    21 #omp_level_size=1
    22 ###########################################
    23 ## There must be less MPIxOpenMP processes than the 10 x nsplit_i x nsplit_j tiles
    24 ## typically for pure MPI runs, let nproc = 10 x nsplit_i x nsplit_j
    25 ## it is better to have nbp/split >~ 10
    26 ###########################################
    27 ## 10 procs
    28 nsplit_i=1
    29 nsplit_j=2
    30 #### 50 noeuds de 24 processeurs = 1200 procs
    31 #nsplit_i=10
    32 #nsplit_j=12
    33 
    34 # Number of vertical layer (llm) : integer (default=19)
    35 #llm=64
    36 llm=73
    37 
    38 # disvert : vertical discretisation : string (default='std') : std, ncar, ncar30l
     10# Vertical grid : [std|ncar|ncarl30] (default=std)
    3911#disvert=read_apbp
    4012disvert=plugin
    4113
    42 # optim_it : mesh optimisation : number of iteration : integer (default=0)
    43 #optim_it=1000
    44 optim_it=100
     14# Mesh optimisation : number of iterations : integer (default=0)
     15optim_it = 1000
    4516
    46 # ---------------------------------- Time---------------------------------
     17# Sub splitting of main rhombus : integer (default=1)
     18nsplit_i = 1
     19nsplit_j = 1
    4720
    48 ## scheme type : string : euler, leapfrog_matsuno, runge_kutta )
    49 # time_scheme = ARK2.3 (RK 2nd order at 3 levels) | leapfrog_matsuno | ... 
    50 time_scheme = ARK2.3
     21#number of openmp task on vertical level
     22omp_level_size=1
    5123
    52 ## matsuno period : integer ( default=5) Only used for leapfrog_matsuno scheme
    53 matsuno_period = 10
     24#---------------- Numerics ----------------
    5425
    55 # timestep : real (default=480s)
    56 # dt = 92.473958333334
    57 ### attention 3 chiffres significatifs dans XIOS
    58 # number of dynamical steps per day (instead of dt)
    59 day_step=960
     26# Advection called every itau_adv time steps : integer (default=2)
     27itau_adv = 1
    6028
    61 # advection called every itau_adv time steps : integer (default 2)
    62 # standard : umax=100m/s vs c=340m/s (ratio 1:3)
    63 # in JW06 umax=35m/s vs c=340m/s (ratio 1:10)
    64 itau_adv=3
     29# Time step in s : real (default=480)
     30# dt = 720
     31# Alternative to specifying "dt", specify number of steps per day : day_step
     32day_step = 960
    6533
    66 # number of timestep (default 100) (ignored if run_length is set)
    67 #itaumax = 10
    68 
    69 # run length : real (default=dt*itaumax)
    70 
    71 ####################################
    72 
    73 ## 1 martian day
    74 #run_length = 88775
    75 #run_length = 887750
    76 
    77 ## 1 martian year : 59212925s
    78 ## first martian month (61sols):5415275s
    79 
    80 # number of days to run
    81 ndays=1
    82 
    83 ####################################
    84 
    85 ##activate IO (default = true)
    86 #enable_io = false
    87 
    88 ## output with XIOS (only if compiled with XIOS): true/false (default true)
    89 #xios_output=false
    90 
    91 # output field period (valid XIOS or not) : integer (default none)
    92 # [should be equal to dt if XIOS dynamical outputs are wanted]
    93 # [because write_period sets synchronization frequency with XIOS]
    94 write_period = 92.473958333
     34# Number of tracers : integer (default=1)
     35nqtot = 11
    9536
    9637
    97 #itau_write_etat0=380520
     38#---------------- Time and output ----------------
    9839
    99 # ---------------------------------- Misc --------------------------------
     40# Time style : [none|dcmip] (default=dcmip)
     41time_style = none
    10042
    101 # number of tracer (nqtot) : integer (default 1)
    102 nqtot=1
     43# Run length in s : real (default=??)
     44# run_length = 103680000
     45run_length = 462.369791666
     46# Alternative to specifying "run_length", specify number of days to run : ndays
     47# ndays=1
    10348
    104 # pression value where output is interpolated : real (default=0, no output)
    105 ###out_pression_level=85000
     49# Interval in s between two outputs : integer (default=0)
     50#write_period = 10800
     51# output every dyn time step => dt = day_length/day_step ; 88775/960=92.4739583333
     52write_period= 92.4739583333333
    10653
    107 # etat0 : initial state : string (default=jablonowsky06) :
    108 # jablonowsky06, academic, ncar
     54
     55# Initial state :
     56#   [jablonowsky06|academic|dcmip[1-4]|heldsz|dcmip2_schaer_noshear] (default=jablonowsky06)
     57etat0=isothermal
     58etat0_isothermal_temp=200
     59# pertub initial state by a factor of ...
     60etat0_ps_white_noise=0.01
     61etat0_theta_rhodz_white_noise=0.01
    10962
    11063#etat0=start_file
    11164#etat0_start_file_colocated=true
    11265
    113 ## -- to cross the 2y limit
    114 #etat0_start_iteration=0
    115 #run_length=38052
    116 
    117 etat0=isothermal
    118 etat0_isothermal_temp=200
    119 
    12066# start file name (default is start.nc)
    12167# restart file name (default is restart.nc)
    122 #start_file_name=start_icosa
     68start_file_name=start_icosa
    12369restart_file_name=restart_icosa
    12470
    125 #etat0_start_iteration_reset=true
    126 #etat0_start_iteration=0
     71etat0_start_iteration_reset=true
     72etat0_start_iteration=0
    12773
    128 ##### for one-day run from a profile to create a start
    129 #etat0=temperature_profile
    130 #temperature_profile_file=temp_profile.txt
    131 #run_length=38052
     74# Dissipation time for grad(div) : real (default=5000)
     75tau_graddiv = 18000
    13276
    133 # ------------------------------ Dynamics --------------------------------
    134 
    135 # caldyn : computation type for gcm equation : string (default=gcm) : gcm, adv
    136 caldyn=gcm
    137 
    138 # caldyn_conserv : string (default=energy) : energy,enstrophy
    139 caldyn_conserv=energy
    140 
    141 # caldyn_exner : scheme for computing Exner function : string (default=direct) : direct,lmdz
    142 caldyn_exner=direct
    143 
    144 # caldyn_hydrostat : scheme for computing geopotential : string (default=direct) : direct,lmdz
    145 caldyn_hydrostat=direct
    146 
    147 # guided_type : string (default=none) : none, ncar
    148 guided_type=none
    149 
    150 #Sponge layer
    151 ### iflag_sponge=0 for no sponge
    152 ### iflag_sponge=1 for sponge over 4 topmost layers
    153 ### iflag_sponge=2 for sponge from top to ~1% of top layer pressure
    154 ### tau_sponge --> damping frequency at last layer
    155 ### e-5 medium / e-4 strong yet reasonable / e-3 very strong
    156 ### mode_sponge=1 for u,v --> 0
    157 ### mode_sponge=2 for u,v --> zonal mean (NOT IMPLEMENTED)
    158 ### mode_sponge=3 for u,v,h --> zonal mean (NOT IMPLEMENTED)
    159 #iflag_sponge = 1
    160 iflag_sponge = 1
    161 tau_sponge = 1.e-4
    162 #mode_sponge = 1
    163 
    164 
    165 # ---------------------------------- Dissipation ---------------------------------
    166 
    167 # dissipation time graddiv : real (default=5000)
    168 tau_graddiv = 2000
    169 
    170 # number of iteration for graddiv : integer (default=1)
     77# Exponent of grad(div) disspation : integer (default=1)
    17178nitergdiv = 2
    17279
    173 # dissipation time nxgradrot (default=5000)
    174 tau_gradrot = 4000
     80# Dissipation time for curl(curl) : real (default=5000)
     81tau_gradrot = 18000
    17582
    176 # number of iteration for nxgradrot : integer (default=1)
    177 nitergrot=2
     83# Exponent of curl(curl) disspation : integer (default=1)
     84nitergrot = 2
    17885
    179 # dissipation time divgrad (theta) (default=5000)
    180 tau_divgrad= 4000
    181 # number of iteration for divgrad : integer (default=1)
    182 niterdivgrad=2
     86# Dissipation time for div(grad) : real (default=5000)
     87tau_divgrad = 18000
    18388
    184 # Vertical evolution of the dissipation coefficient
    185 # vert_prof_dissip_type=legacy
    186 vert_prof_dissip_type=plugin
     89# Exponent of div(grad) disspation : integer (default=1)
     90niterdivgrad = 2
    18791
    188 # vertical dissipation setup (none|altitude|pressure)
    189 vert_prof_dissip_setup=altitude
    190 dissip_fac_mid=3.
    191 dissip_fac_up=30.
    192 dissip_startalt=70.
    193 dissip_deltaz=30.
     92#---------------- Planet ----------------
    19493
    195 #Vertical coefficient for dissipation: 1 is for Earth, 2 Mars, 3 Venus, default is basic scheme
    196 #vert_prof_dissip=2
    197 #fac_mid=3.
    198 #fac_up=30.
    199 #dissip_deltaz=30.
    200 #startalt=70.
    201 
    202 # Rayleigh friction : string (default=none) : none, dcmip2_schaer_noshear, dcmip2_schaer_shear
    203 rayleigh_friction_type=none
    204 #rayleigh_friction_type=giant_liu_schneider
    205 #rayleigh_limlat = 33.
    206 #rayleigh_friction_tau = 8640000.
     94INCLUDEDEF=mars_const.def
    20795
    20896# -------------------------------- Physics -------------------------------------
    20997
    210 # (itau_physics=160)*(dt=118.9125) --> half a saturn day as physical timestep
    211 # ---- for some reason (day consistency, physical timestep must be less a day)
    212 # ---- change also in run.def
     98# Physics package : [none|held_suarez|dcmip] (default=none)
     99physics = phys_external
     100
     101# call physics every itau_physics (dynamical) time step
    213102itau_physics=5
     103#itau_physics=10
    214104
    215 # kind of physics : string : none, dcmip (default=none)
    216 physics=phys_external
    217 
    218 ## testcase physics for dcmip : INTEGER : 1, 2 (default=1)
    219 #dcmip_physics=1
    220 
    221 # -------------------- parameters for NCAR test cases ------------------------
    222 
    223 # NCAR advection test, initial tracer : string ( default='cos_bell')
    224 # const, slotted_cyl, cos_bell, dbl_cos_bell_q1, dbl_cos_bell_q2, complement, hadley
    225 ncar_adv_shape=cos_bell
    226 
    227 # NCAR advection test, wind field : string (default='deform') : solid, deform, hadley
    228 ncar_adv_wind=solid
    229 
    230 # ncar_T0 : reference temperature for NCAR test cases : real (default=300)
    231 # also used by disvert if disvert=ncar
    232 ncar_T0=300
    233 
    234 # ncar_p0 : reference pressure for NCAR test cases : real (default=1e5)
    235 # also used by disvert if disvert=ncar
    236 ncar_p0=1e5
    237 
    238 # ncar_disvert_c : exponent for B(eta) : integer (default=1)
    239 # used by disvert if disvert=ncar
    240 
    241 ncar_disvert_c=1
    242 
    243 # dcmip 4 testcase : integer (default=1) : 1, 2
    244 dcmip4_testcase=1
    245 #-----------------------------------------------------------------------
    246 
    247 
    248 check_conservation = detailed
    249 itau_check_conserv = 320
     105# physics initial state (startfi.nc) if startphy_file=.true.
     106startphy_file=.false.
  • trunk/LMDZ.MARS/util/startarchive2icosa/start_archive2icosa.f90

    r2906 r2941  
    2323  INTEGER :: src_nj, src_nj_glo, src_topo_nj, src_topo_nj_glo
    2424  INTEGER :: src_nlev ! number of vertical layers
    25   INTEGER :: src_nq=7 ! number of tracers
     25  INTEGER :: src_nq=11 ! number of tracers
    2626  INTEGER :: src_nt=1 ! number of time steps
    2727  INTEGER :: src_nsoil=18 ! number of soil layers
     28  INTEGER :: src_nslope=1 ! number of subslope
    2829  DOUBLE PRECISION,ALLOCATABLE :: lev_values(:) ! vertical axis
    2930  DOUBLE PRECISION,ALLOCATABLE :: lev_p1_values(:) ! vertical axis
    3031  DOUBLE PRECISION,ALLOCATABLE :: nq_values(:) ! tracer # axis
    3132  DOUBLE PRECISION,ALLOCATABLE :: soil_layers_values(:) ! soil axis
     33  DOUBLE PRECISION,ALLOCATABLE :: subslope_values(:) ! subslope axis
    3234  DOUBLE PRECISION,ALLOCATABLE :: src_lon(:) ! mesh center coordinate
    3335  DOUBLE PRECISION,ALLOCATABLE :: src_lat(:)
     
    3638  DOUBLE PRECISION,ALLOCATABLE :: src_controle(:)
    3739  DOUBLE PRECISION,ALLOCATABLE :: src_field_2D(:,:)
     40  DOUBLE PRECISION,ALLOCATABLE :: src_field_2D_subslope(:,:,:)
    3841  DOUBLE PRECISION,ALLOCATABLE :: src_pk(:,:)
    3942  DOUBLE PRECISION,ALLOCATABLE :: src_field_3D(:,:,:)
     
    4447  DOUBLE PRECISION,ALLOCATABLE :: src_topo(:,:)
    4548  DOUBLE PRECISION,ALLOCATABLE :: src_field_3D_soil(:,:,:) ! 3D grid in soil, for tsoil et inertia
     49  DOUBLE PRECISION,ALLOCATABLE :: src_field_3D_soil_subslope(:,:,:,:) ! 3D grid in soil, for tsoil et inertia
    4650  DOUBLE PRECISION,ALLOCATABLE :: src_soil_layers(:) ! soil_depth
    4751  DOUBLE PRECISION,ALLOCATABLE :: src_field_3D_p1(:,:,:) !q2 field
     
    6064  INTEGER :: dst_nvertex
    6165  INTEGER :: ncid
    62   INTEGER :: dimids(4)
     66  INTEGER :: dimids(5)
    6367  INTEGER :: varid
    6468 
     
    140144  write(*,*) "rank=",rank,"dimids tsoil =",dimids
    141145  ierr=NF90_INQUIRE_DIMENSION(ncid, dimids(3), len=src_nsoil)
     146 ierr=NF90_INQUIRE_DIMENSION(ncid, dimids(4), len=src_nslope)
    142147  write(*,*) "rank=",rank," src_nsoil=",src_nsoil ! number of vertical layers
     148  write(*,*) "rank=",rank," src_nslope=",src_nslope ! number of subslope
    143149
    144150! assume domain splitup with MPI only along latitudes
     
    161167  ALLOCATE(src_lat(src_nj))
    162168  ALLOCATE(src_field_2D(src_ni,src_nj))
     169  ALLOCATE(src_field_2D_subslope(src_ni,src_nj,src_nslope))
    163170  ALLOCATE(src_pk(src_ni,src_nj))
    164171  ALLOCATE(src_field_3D(src_ni,src_nj,src_nlev))
    165172  ALLOCATE(src_field_3D_p1(src_ni,src_nj,src_nlev+1))
    166173  ALLOCATE(src_field_3D_soil(src_ni,src_nj,src_nsoil))
     174  ALLOCATE(src_field_3D_soil_subslope(src_ni,src_nj,src_nsoil,src_nslope))
    167175!  ALLOCATE(src_field_soil_layers(src_nsoil))
    168176  ALLOCATE(src_pressure(src_ni,src_nj,src_nlev+1))
     
    283291  soil_layers_values=(/ (l,l=1,src_nsoil) /)
    284292  CALL xios_set_axis_attr("soil_layers",n_glo=src_nsoil,value=soil_layers_values)
     293  ALLOCATE(subslope_values(src_nslope))
     294  subslope_values=(/ (l,l=1,src_nslope) /)
     295  CALL xios_set_axis_attr("subslope",n_glo=src_nslope,value=subslope_values)
    285296
    286297! Set domains
     
    367378   
    368379    ! surface temperature:
    369     CALL xios_recv_field("src_tsurf",src_field_2D)
    370     WRITE(*,*) rank,":src_tsurf(1:2,1:3)=",src_field_2D(1:2,1:3)
    371     CALL xios_send_field("tsurf_clean",src_field_2D(1:src_ni-1,1:src_nj))
     380    CALL xios_recv_field("src_tsurf",src_field_2D_subslope)
     381    WRITE(*,*) rank,":src_tsurf(1:2,1:3,1)=",src_field_2D_subslope(1:2,1:3,1)
     382    CALL xios_send_field("tsurf_clean",src_field_2D_subslope(1:src_ni-1,1:src_nj,:))
    372383
    373384    ! co2 ice coverage:
     
    377388
    378389    ! emissivity:
    379     CALL xios_recv_field("src_emis",src_field_2D)
    380     WRITE(*,*) rank,":src_emis(1:2,1:3)=",src_field_2D(1:2,1:3)
    381     CALL xios_send_field("emis_clean",src_field_2D(1:src_ni-1,1:src_nj))
     390    CALL xios_recv_field("src_emis",src_field_2D_subslope)
     391    WRITE(*,*) rank,":src_emis(1:2,1:3,1)=",src_field_2D_subslope(1:2,1:3,1)
     392    CALL xios_send_field("emis_clean",src_field_2D_subslope(1:src_ni-1,1:src_nj,:))
    382393
    383394    ! q2 : q2surf for first layer of q2, the rest is q2atm
     
    422433          CALL xios_send_field("co2_clean", &
    423434                        src_field_3D(1:src_ni-1,1:src_nj,1:src_nlev))
    424           CALL xios_recv_field("src_co2_surf",src_field_2D)
     435          CALL xios_recv_field("src_co2_surf",src_field_2D_subslope)
    425436          CALL xios_send_field("co2_surf_clean", &
    426                         src_field_2D(1:src_ni-1,1:src_nj))
     437                        src_field_2D_subslope(1:src_ni-1,1:src_nj,:))
    427438       elseif (i==2) THEN
    428439          CALL xios_send_field("dust_number_clean", &
    429440                        src_field_3D(1:src_ni-1,1:src_nj,1:src_nlev))
    430           CALL xios_recv_field("src_dust_number_surf",src_field_2D)
     441          CALL xios_recv_field("src_dust_number_surf",src_field_2D_subslope)
    431442          CALL xios_send_field("dust_number_surf_clean", &
    432                         src_field_2D(1:src_ni-1,1:src_nj))
     443                        src_field_2D_subslope(1:src_ni-1,1:src_nj,:))
    433444       elseif (i==3) THEN
    434445          CALL xios_send_field("dust_mass_clean", &
    435446                        src_field_3D(1:src_ni-1,1:src_nj,1:src_nlev))
    436           CALL xios_recv_field("src_dust_mass_surf",src_field_2D)
     447          CALL xios_recv_field("src_dust_mass_surf",src_field_2D_subslope)
    437448          CALL xios_send_field("dust_mass_surf_clean", &
    438                         src_field_2D(1:src_ni-1,1:src_nj))
     449                        src_field_2D_subslope(1:src_ni-1,1:src_nj,:))
    439450       elseif (i==4) THEN
    440451          CALL xios_send_field("ccn_number_clean", &
    441452                        src_field_3D(1:src_ni-1,1:src_nj,1:src_nlev))
    442           CALL xios_recv_field("src_ccn_number_surf",src_field_2D)
     453          CALL xios_recv_field("src_ccn_number_surf",src_field_2D_subslope)
    443454          CALL xios_send_field("ccn_number_surf_clean", &
    444                         src_field_2D(1:src_ni-1,1:src_nj))
     455                        src_field_2D_subslope(1:src_ni-1,1:src_nj,:))
    445456       elseif (i==5) THEN
    446457          CALL xios_send_field("ccn_mass_clean", &
    447458                        src_field_3D(1:src_ni-1,1:src_nj,1:src_nlev))
    448           CALL xios_recv_field("src_ccn_mass_surf",src_field_2D)
     459          CALL xios_recv_field("src_ccn_mass_surf",src_field_2D_subslope)
    449460          CALL xios_send_field("ccn_mass_surf_clean", &
    450                         src_field_2D(1:src_ni-1,1:src_nj))
     461                        src_field_2D_subslope(1:src_ni-1,1:src_nj,:))
    451462       elseif (i==6) THEN
    452463          CALL xios_send_field("h2o_ice_clean", &
    453464                        src_field_3D(1:src_ni-1,1:src_nj,1:src_nlev))
    454           CALL xios_recv_field("src_h2o_ice_surf",src_field_2D)
     465          CALL xios_recv_field("src_h2o_ice_surf",src_field_2D_subslope)
    455466          CALL xios_send_field("h2o_ice_surf_clean", &
    456                         src_field_2D(1:src_ni-1,1:src_nj))
     467                        src_field_2D_subslope(1:src_ni-1,1:src_nj,:))
    457468       elseif (i==7) THEN
    458469          CALL xios_send_field("h2o_vap_clean", &
    459470                        src_field_3D(1:src_ni-1,1:src_nj,1:src_nlev))
    460           CALL xios_recv_field("src_h2o_vap_surf",src_field_2D)
     471          CALL xios_recv_field("src_h2o_vap_surf",src_field_2D_subslope)
    461472          CALL xios_send_field("h2o_vap_surf_clean", &
    462                         src_field_2D(1:src_ni-1,1:src_nj))
     473                        src_field_2D_subslope(1:src_ni-1,1:src_nj,:))
     474        elseif (i==8) THEN
     475          CALL xios_send_field("stormdust_number_clean", &
     476                        src_field_3D(1:src_ni-1,1:src_nj,1:src_nlev))
     477          CALL xios_recv_field("src_stormdust_number_surf",src_field_2D_subslope)
     478          CALL xios_send_field("stormdust_number_surf_clean", &
     479                        src_field_2D_subslope(1:src_ni-1,1:src_nj,:))
     480        elseif (i==9) THEN
     481          CALL xios_send_field("stormdust_mass_clean", &
     482                        src_field_3D(1:src_ni-1,1:src_nj,1:src_nlev))
     483          CALL xios_recv_field("src_stormdust_mass_surf",src_field_2D_subslope)
     484          CALL xios_send_field("stormdust_mass_surf_clean", &
     485                        src_field_2D_subslope(1:src_ni-1,1:src_nj,:))
     486        elseif (i==10) THEN
     487          CALL xios_send_field("topdust_number_clean", &
     488                        src_field_3D(1:src_ni-1,1:src_nj,1:src_nlev))
     489          CALL xios_recv_field("src_topdust_number_surf",src_field_2D_subslope)
     490          CALL xios_send_field("topdust_number_surf_clean", &
     491                        src_field_2D_subslope(1:src_ni-1,1:src_nj,:))
     492        elseif (i==11) THEN
     493          CALL xios_send_field("topdust_mass_clean", &
     494                        src_field_3D(1:src_ni-1,1:src_nj,1:src_nlev))
     495          CALL xios_recv_field("src_topdust_mass_surf",src_field_2D_subslope)
     496          CALL xios_send_field("topdust_mass_surf_clean", &
     497                        src_field_2D_subslope(1:src_ni-1,1:src_nj,:))
    463498       ENDIF
    464499    ENDDO
    465500
    466501    ! soil temperature
    467     CALL xios_recv_field("src_tsoil",src_field_3D_soil)
     502    CALL xios_recv_field("src_tsoil",src_field_3D_soil_subslope)
    468503    CALL xios_send_field("tsoil_clean", &
    469                           src_field_3D_soil(1:src_ni-1,1:src_nj,1:src_nsoil))
     504                          src_field_3D_soil_subslope(1:src_ni-1,1:src_nj,1:src_nsoil,:))
    470505    ! soil thermal intertia
    471506    CALL xios_recv_field("src_inertiedat",src_field_3D_soil)
Note: See TracChangeset for help on using the changeset viewer.