source: TOOLS/CMIP6_FORCING/NITROGEN/nitrogen.sh @ 3595

Last change on this file since 3595 was 3595, checked in by tlurton, 4 years ago

20/02/2018 Th. Lurton
Updated paths to final location of input files on Ciclad: /prodigfs/project/input4MIPs/.

  • Property svn:executable set to *
File size: 2.2 KB
Line 
1dirin1="/prodigfs/project/input4MIPs/CMIP6/CMIP/NCAR/NCAR-CCMI-2-0/atmos/mon"
2dirin2="gn/v20161207"
3dirinC1="/prodigfs/project/input4MIPs/CMIP6/CMIP/NCAR/NCAR-CCMI-2-0/atmos/monC"
4
5dirout="./OUTPUT"
6if [ ! -d ${dirout} ] ; then mkdir ${dirout} ; fi
7#
8#--1850 climatological N deposition
9#
10drynhx=${dirinC1}"/drynhx/"${dirin2}"/drynhx_input4MIPs_surfaceFluxes_CMIP_NCAR-CCMI-2-0_gn_185001-185012.nc"
11wetnhx=${dirinC1}"/wetnhx/"${dirin2}"/wetnhx_input4MIPs_surfaceFluxes_CMIP_NCAR-CCMI-2-0_gn_185001-185012.nc"
12drynoy=${dirinC1}"/drynoy/"${dirin2}"/drynoy_input4MIPs_surfaceFluxes_CMIP_NCAR-CCMI-2-0_gn_185001-185012.nc"
13wetnoy=${dirinC1}"/wetnoy/"${dirin2}"/wetnoy_input4MIPs_surfaceFluxes_CMIP_NCAR-CCMI-2-0_gn_185001-185012.nc"
14#
15cdo merge ${drynhx} ${wetnhx} ${dirout}/CMIP6_fluxnhx_merged_clim_1850.nc
16cdo merge ${drynoy} ${wetnoy} ${dirout}/CMIP6_fluxnoy_merged_clim_1850.nc
17cdo expr,'fluxnhx=drynhx+wetnhx' ${dirout}/CMIP6_fluxnhx_merged_clim_1850.nc ${dirout}/CMIP6_fluxnhx_clim_1850.nc
18cdo expr,'fluxnoy=drynoy+wetnoy' ${dirout}/CMIP6_fluxnoy_merged_clim_1850.nc ${dirout}/CMIP6_fluxnoy_clim_1850.nc
19rm -f ${dirout}/CMIP6_fluxnhx_merged_clim_1850.nc ${dirout}/CMIP6_fluxnoy_merged_clim_1850.nc
20#
21#
22#--1850-2014 annual N deposition
23#
24drynhx=${dirin1}"/drynhx/"${dirin2}"/drynhx_input4MIPs_surfaceFluxes_CMIP_NCAR-CCMI-2-0_gn_185001-201412.nc"
25wetnhx=${dirin1}"/wetnhx/"${dirin2}"/wetnhx_input4MIPs_surfaceFluxes_CMIP_NCAR-CCMI-2-0_gn_185001-201412.nc"
26drynoy=${dirin1}"/drynoy/"${dirin2}"/drynoy_input4MIPs_surfaceFluxes_CMIP_NCAR-CCMI-2-0_gn_185001-201412.nc"
27wetnoy=${dirin1}"/wetnoy/"${dirin2}"/wetnoy_input4MIPs_surfaceFluxes_CMIP_NCAR-CCMI-2-0_gn_185001-201412.nc"
28#
29cdo merge ${drynhx} ${wetnhx} ${dirout}/CMIP6_fluxnhx_merged_annual_1850-2014.nc
30cdo merge ${drynoy} ${wetnoy} ${dirout}/CMIP6_fluxnoy_merged_annual_1850-2014.nc
31cdo splityear -expr,'fluxnhx=drynhx+wetnhx' ${dirout}/CMIP6_fluxnhx_merged_annual_1850-2014.nc ${dirout}/CMIP6_fluxnhx_annual_1850-2014.nc
32cdo splityear -expr,'fluxnoy=drynoy+wetnoy' ${dirout}/CMIP6_fluxnoy_merged_annual_1850-2014.nc ${dirout}/CMIP6_fluxnoy_annual_1850-2014.nc
33rm -f ${dirout}/CMIP6_fluxnhx_merged_annual_1850-2014.nc ${dirout}/CMIP6_fluxnoy_merged_annual_1850-2014.nc
Note: See TracBrowser for help on using the repository browser.