Changeset 2813 for trunk/LMDZ.MARS


Ignore:
Timestamp:
Nov 8, 2022, 3:32:12 PM (2 years ago)
Author:
romain.vande
Message:

DYNAMICO MARS
Update startarchive2icosa repertory for new version of Dynamico
RV

Location:
trunk/LMDZ.MARS
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/README

    r2808 r2813  
    37573757Bug fix in jthermcalc_e107 (wrong indexes used in some computations involving
    37583758NO2 and H2).
     3759
     3760== 08/11/2022 == RV
     3761Update startarchive2icosa repertory for new version of Dynamico
  • trunk/LMDZ.MARS/util/startarchive2icosa/README

    r2532 r2813  
    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.
     8You can use the files named *_no_start to have an example of callphys etc to run without startfiles
    89
    910Job_mpi is the file you need to run start_archive2icosa on Occigen
     
    1819--------------
    19201) input file start_archive.nc needs some minor adaptations:
    20 - variable "nivsigs" needs be renamed "sigs" (XIOS requires CF-compliant files)
     21- variable "nivsigs" needs be renamed "sigs" (XIOS requires CF-compliant files) (RV: No neeeded anymore)
    2122ncrename -vnivsigs,sigs start_archive.nc
    2223- input file start_archive.nc need be converted to NetCDF4 format
    23 nccopy -k 'netCDF-4' start_archive.nc start_archive_nc4.nc
     24nccopy -k 4 start_archive.nc start_archive_nc4.nc
    24252) script "compile" can be used to compile main tool start_archive2icosa.f90
    2526   as well as rearrange_startphy.f90
  • trunk/LMDZ.MARS/util/startarchive2icosa/compile

    r2532 r2813  
    11#!/usr/bin/bash
    22
    3 source /scratch/cnt0027/lmd1167/adelavois/models/code/XIOS/arch.env
    4 source /scratch/cnt0027/lmd1167/adelavois/models/code/XIOS/arch.path
     3source ../../../../../trunk_Dynamico/trunk/XIOS/arch.env
     4source ../../../../../trunk_Dynamico/trunk/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 /scratch/cnt0027/lmd1167/adelavois/models/code/XIOS/inc \
    10 -L /scratch/cnt0027/lmd1167/adelavois/models/code/XIOS/lib -lxios -lstdc++ \
     9-I ../../../../../trunk_Dynamico/trunk/XIOS/inc \
     10-L ../../../../../trunk_Dynamico/trunk/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 /scratch/cnt0027/lmd1167/adelavois/models/code/XIOS/inc \
    17 -L /scratch/cnt0027/lmd1167/adelavois/models/code/XIOS/lib -lxios -lstdc++ \
     16-I ../../../../../trunk_Dynamico/trunk/XIOS/inc \
     17-L ../../../../../trunk_Dynamico/trunk/XIOS/lib -lxios -lstdc++ \
    1818-o rearrange_startphy
    1919
  • trunk/LMDZ.MARS/util/startarchive2icosa/icosa_finalize.bash

    r2532 r2813  
    77# load nco module
    88module purge
    9 source /scratch/cnt0027/lmd1167/adelavois/models/code/XIOS/arch.env
    10 module load nco/4.7.9-gcc-4.8.5-hdf5-1.8.18-openmpi-2.0.4
     9source /scratch/cnt0027/lmd1167/adelavois/models/code/XIOS/arch.env #You have to adapt to your own path
     10#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
     11module load nco
    1112
    1213#conversion to netcdf 3 in order to rename and add variables, not properly done with netcdf4 files
     
    2425#Temporay soildepth array from Dynamico restartfi
    2526ncks -A -v soildepth \
    26          ../../mars_dynamico_update_basic/startfi_0.nc startphy_nc3.nc
     27         ../../mars_dynamico_update_basic/startfi_0.nc startphy_nc3.nc #You have to adapt to your own path
    2728
    28 nccopy -k 'netCDF-4' startphy_nc3.nc startfi.nc
     29nccopy -k 4 startphy_nc3.nc startfi.nc
    2930
    3031#Temporary Time variable from start2archive; should be added with xios
    31 ncks -A -v Time \
    32          start_archive_nc4.nc startfi.nc
     32#ncks -A -v Time \
     33#         start_archive_nc4.nc startfi.nc
     34ncks -O -x -v time_counter startfi.nc startfi.nc_tmp
     35ncks -A -v Time start.nc startfi.nc_tmp
     36cp startfi.nc_tmp startfi.nc
    3337
    3438rearrange_startphy > rearrange_startphy.out 2>&1
     
    4751     start_icosa_ref.nc start_icosa.nc
    4852
     53# In the current version of Dynamico, the variable q for tracer is needed but unused.
     54# To create this unused variable simply run this short python code
     55
     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
    4970# cleanup
    5071rm -rf startphy_icosa_nc3.nc startphy_nc3.nc
Note: See TracChangeset for help on using the changeset viewer.