source: trunk/LMDZ.COMMON/libf/evolution/deftank/modify_startfi_var.sh @ 3554

Last change on this file since 3554 was 3210, checked in by jbclement, 11 months ago

PEM:

  • Addition in the deftank of a bash script "modify_startfi_var.sh" to modify the value of a variable in a "startfi.nc".
  • Small corrections due to r3206.

JBC

  • Property svn:executable set to *
File size: 603 bytes
Line 
1#!/bin/bash
2#######################################################################
3### Script to modify the value of a variable in a file "startfi.nc" ###
4#######################################################################
5
6# Name of the file
7name_file="startfi.nc"
8
9# Name of the variable to be modified
10var_name="co2"
11
12# New value for the variable
13new_var=8.
14
15
16#######################################################################
17# Update the netCDF file
18ncap2 -O -s "$var_name=$new_var" \
19         $name_file $name_file
20
21echo "In \"$name_file\":"
22echo "New $var_name = $new_var"
23echo "Done!"
Note: See TracBrowser for help on using the repository browser.