source: LMDZ6/branches/LMDZ_ECRad/libf/phylmd/ecrad/test/i3rc/duplicate_profiles.sh @ 4993

Last change on this file since 4993 was 4728, checked in by idelkadi, 11 months ago

Update of ecrad in the LMDZ_ECRad branch of LMDZ:

  • version 1.6.1 of ecrad
  • files are no longer grouped in the same ecrad directory.
  • the structure of ecrad offline is preserved to facilitate updating in LMDZ
  • cfg.bld modified to take into account the new added subdirectories.
  • the interface routines and those added in ecrad are moved to the phylmd directory
  • Property svn:executable set to *
File size: 1.4 KB
Line 
1#!/bin/bash -e
2#
3# (C) Copyright 2014- ECMWF.
4#
5# This software is licensed under the terms of the Apache Licence Version 2.0
6# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
7#
8# In applying this licence, ECMWF does not waive the privileges and immunities
9# granted to it by virtue of its status as an intergovernmental organisation
10# nor does it submit to any jurisdiction.
11
12# Duplicate profiles with solar zenith angles varying from 0 to 90 degrees
13# You need to have the nco netcdf tools in your PATH
14
15INPUT=$1
16OUTPUT=$2
17
18NSZA=46
19COS_SZA='1.0,0.999391,0.997564,0.994522,0.990268,0.984808,0.978148,0.970296,0.961262,0.951057,0.939693,0.927184,0.913545,0.898794,0.882948,0.866025,0.848048,0.829038,0.809017,0.788011,0.766044,0.743145,0.71934,0.694658,0.669131,0.642788,0.615661,0.587785,0.559193,0.529919,0.5,0.469472,0.438371,0.406737,0.374607,0.34202,0.309017,0.275637,0.241922,0.207912,0.173648,0.139173,0.104528,0.0697565,0.0348995,0.01'
20#NSZA=2
21#COS_SZA='1,0.1'
22
23# Check for existence of NCO commands
24command -v ncks >/dev/null 2>&1 || { \
25 echo "###########################################################" ; \
26 echo "### Error: NCO commands (ncks etc) needed but not found ###" ; \
27 echo "###########################################################" ; \
28 exit 1; }
29
30ncks -O --mk_rec_dmn column $INPUT tmp0.nc
31ncrcat -O -n $NSZA,1,0 tmp0.nc tmp_$OUTPUT
32ncap2 -O -s "cos_solar_zenith_angle(:)={$COS_SZA}" tmp_$OUTPUT $OUTPUT
33rm tmp0.nc tmp_$OUTPUT
Note: See TracBrowser for help on using the repository browser.