New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
2021WP/VLD-05_Coward_SETTE_inputs (diff) – NEMO

Changes between Version 6 and Version 7 of 2021WP/VLD-05_Coward_SETTE_inputs


Ignore:
Timestamp:
2021-03-15T18:46:42+01:00 (3 years ago)
Author:
acc
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • 2021WP/VLD-05_Coward_SETTE_inputs

    v6 v7  
    515515 
    516516=== Stage 2 details 
     517 
     518The second stage is to take the sets produced in stage 1 and to reduce the time period of any forcing data to more closely match that required for the standard SETTE testing. To permit some additional testing for those cases where longer tests may be required a period of twice the standard test length has been chosen. The standard test lengths are: 
     519 
     520||GYRE_PISCES ||90 days || 
     521||ORCA2_ICE_PISCES ||62 days || 
     522||ORCA2_OFF_PISCES ||95 days || 
     523||AMM12 ||4 days || 
     524||SAS ||16 days || 
     525||ORCA2_ICE_OBS ||5 days || 
     526||AGRIF ||5d and 9h || 
     527||WED025 ||10 days || 
     528 
     529where the maximum length returned by grepping the setting of ITEND from sette_reference_configurations.sh has been taken. There are two cases where simply doubling this length and selecting a number of time records based on that number does not work though: 
     530 
     531* ORCA2_OFF_PISCES which uses a climatological set of inputs and starts on 1st January => the last record is also needed at the start. 
     532* WED025 which starts on 15th January => 35 days of records are required for a 20 day test. 
     533 
     534More on these cases later but first the additional commands required to limit the time records are: 
     535 
     536{{{ 
     537mkdir r4.2_RC 
     538cd r4.2_RC 
     539cp -pr ../r4.2_RC_FULL/AGRIF_DEMO_v4.2_RC_FULL   AGRIF_DEMO_v4.2_RC 
     540cp -pr ../r4.2_RC_FULL/AMM12_v4.2_RC_FULL        AMM12_v4.2_RC 
     541cp -pr ../r4.2_RC_FULL/ICE_AGRIF_v4.2_RC_FULL    ICE_AGRIF_v4.2_RC 
     542cp -pr ../r4.2_RC_FULL/ISOMIP+_v4.2_RC_FULL      ISOMIP+_v4.2_RC 
     543cp -pr ../r4.2_RC_FULL/ORCA2_ICE_v4.2_RC_FULL    ORCA2_ICE_v4.2_RC 
     544cp -pr ../r4.2_RC_FULL/ORCA2_OFF_v4.2_RC_FULL    ORCA2_OFF_v4.2_RC 
     545cp -pr ../r4.2_RC_FULL/SAS_v4.2_RC_FULL          SAS_v4.2_RC 
     546cp -pr ../r4.2_RC_FULL/WED025_v4.2_RC_FULL       WED025_v4.2_RC 
     547########## ORCA2_ICEcmds ########## 
     548cd ORCA2_ICE_v4.2_RC 
     549# 
     550# 
     551# ncar_precip.15JUNE2009_fill.nc ncar_rad.15JUNE2009_fill.nc slp.15JUNE2009_fill.nc 
     552#     LAT LON TIME 
     553# q_10.15JUNE2009_fill.nc t_10.15JUNE2009_fill.nc u_10.15JUNE2009_fill.nc v_10.15JUNE2009_fill.nc 
     554#     lat lon time 
     555# Need 180 days @ 6 hourly = 720 records 
     556# 
     557ncks --4 --dfl_lvl 1 --no_abc -v T_10_MOD -d time,0,719 --cnk_plc='xpl' --cnk_dmn lon,32 --cnk_dmn lat,32 --cnk_dmn time,1  t_10.15JUNE2009_fill.nc new_t_10.15JUNE2009_fill.nc 
     558# 
     559ncks --4 --dfl_lvl 1 --no_abc -v U_10_MOD -d time,0,719 --cnk_plc='xpl' --cnk_dmn lon,32 --cnk_dmn lat,32 --cnk_dmn time,1  u_10.15JUNE2009_fill.nc new_u_10.15JUNE2009_fill.nc 
     560# 
     561ncks --4 --dfl_lvl 1 --no_abc -v V_10_MOD -d time,0,719 --cnk_plc='xpl' --cnk_dmn lon,32 --cnk_dmn lat,32 --cnk_dmn time,1  v_10.15JUNE2009_fill.nc new_v_10.15JUNE2009_fill.nc 
     562# 
     563ncks --4 --dfl_lvl 1 --no_abc -v Q_10_MOD -d time,0,719 --cnk_plc='xpl' --cnk_dmn lon,32 --cnk_dmn lat,32 --cnk_dmn time,1  q_10.15JUNE2009_fill.nc new_q_10.15JUNE2009_fill.nc 
     564# 
     565ncks --4 --dfl_lvl 1 --no_abc -v LWDN_MOD,SWDN_MOD -d time,0,179 --cnk_plc='xpl' --cnk_dmn LON,32 --cnk_dmn LAT,32 --cnk_dmn time,1  ncar_rad.15JUNE2009_fill.nc new_ncar_rad.15JUNE2009_fill.nc 
     566# 
     567ncks --4 --dfl_lvl 1 --no_abc -v PRC_MOD1,SNOW --cnk_plc='xpl' --cnk_dmn LON,32 --cnk_dmn LAT,32 --cnk_dmn time,1  ncar_precip.15JUNE2009_fill.nc new_ncar_precip.15JUNE2009_fill.nc 
     568# 
     569ncks --4 --dfl_lvl 1 --no_abc -v SLP -d TIME,0,719 --cnk_plc='xpl' --cnk_dmn LON,32 --cnk_dmn LAT,32 --cnk_dmn TIME,1  slp.15JUNE2009_fill.nc new_slp.15JUNE2009_fill.nc 
     570# 
     571for f in new*; do ff=${f/new_}; mv $f $ff; done 
     572# 
     573ncks --4 --no_abc --cnk_plc='xpl' -d time_counter,0,719 --cnk_dmn x,30 --cnk_dmn y,30 --cnk_dmn time_counter,1  sdw_ecwaves_orca2.nc new_sdw_ecwaves_orca2.nc 
     574mv new_sdw_ecwaves_orca2.nc sdw_ecwaves_orca2.nc 
     575cd ../ 
     576# WEDcmds 
     577cd WED025_v4.2_RC 
     578# u10 v10 t10 precip rsds q10 slp rlds snow 
     579# WED025 starts in middle of January; need 20 days from then = 35 days = 280 records @ 3hourly 
     580for v in u10 v10 t10 precip rsds q10 slp rlds snow 
     581do 
     582 ncks -O -d time,0,279 --cnk_dmn longitude,64 --cnk_dmn latitude,64 ${v}_JRA_y2000.nc 20d_${v}_JRA_y2000.nc 
     583done 
     584# 
     585for v in u10 v10 t10 precip rsds q10 slp rlds snow 
     586do 
     587 mv 20d_${v}_JRA_y2000.nc ${v}_JRA_y2000.nc 
     588done 
     589}}} 
     590These changes reduce the overall volume from 5.5GB to 4.5GB but the two cases mentioned earlier are still large contributors to this volume. The next stage will reduce the volume further by reducing the number of significant digits used for most data. This will allow for much more efficient compression but the SETTE results will be changed as a result. There is, however, an intermediate option which is to reduce the precision of the data that has to be supplied in order to maintain contiguous time records but which are not actually used.  
     591 
     592* In the ORCA2_OFF_PISCES case records 0-37 and 72 of each 5-day mean, annual dataset need to be kept at the original precision but all other records can be reduced to the minimum precision. 
     593 
     594* For WED025, records 0-110 are not used and can, therefore be held at minimum precision. 
     595 
     596Using ncks to achieve is troublesome with compressed data. I appears to be reluctant to insert later records into 
     597compressed datasets. However, carrying out all operations on netCDF-3 format files and converting to netCDF-4 at the end works. Thus, this rather tortuous combination achieves the desired result: 
     598 
     599{{{ 
     600#!/bin/bash 
     601if [ 1 == 1 ] ; then 
     602cd ORCA2_OFF_v4.2_RC 
     603for var in T 
     604do 
     605 echo ${var} 
     606 # Create minimal precision netcdf3 version of entire dataset 
     607   ncks -3 -O --no_abc --ppc default=1 dyna_grid_${var}.nc new2_dyna_grid_${var}.nc 
     608 # Create netcdf3 version of original dataset 
     609   ncks -3 dyna_grid_${var}.nc new3_dyna_grid_${var}.nc 
     610 # Overwrite records 0-71 with minimal precision 
     611   ncks -3 --no_abc -A -d time_counter,0,71 new2_dyna_grid_${var}.nc new3_dyna_grid_${var}.nc 
     612 # Overwrite records 0-37 with original precision 
     613   ncks -3 --no_abc -A -d time_counter,0,37 dyna_grid_${var}.nc new3_dyna_grid_${var}.nc 
     614 # Create netcdf-4 final version with required chunking and compression 
     615   nccopy -7 -c "time_counter/1,x/60,y/50,deptht/4" -d 4 new3_dyna_grid_${var}.nc new4_dyna_grid_${var}.nc 
     616done 
     617# Tidy up 
     618rm new[2,3]*.nc 
     619mv new4_dyna_grid_T.nc dyna_grid_T.nc 
     620 
     621for var in U 
     622do 
     623 echo ${var} 
     624 ncks -3 -O --no_abc --ppc default=1 dyna_grid_${var}.nc new2_dyna_grid_${var}.nc 
     625 ncks -3 dyna_grid_${var}.nc new3_dyna_grid_${var}.nc 
     626 ncks -3 --no_abc -A -d time_counter,0,71 new2_dyna_grid_${var}.nc new3_dyna_grid_${var}.nc 
     627 ncks -3 --no_abc -A -d time_counter,0,37 dyna_grid_${var}.nc new3_dyna_grid_${var}.nc 
     628 nccopy -7 -c "time_counter/1,x/60,y/50,depthu/4" -d 4 new3_dyna_grid_${var}.nc new4_dyna_grid_${var}.nc 
     629done 
     630rm new[2,3]*.nc 
     631mv new4_dyna_grid_U.nc dyna_grid_U.nc 
     632 
     633for var in V 
     634do 
     635 echo ${var} 
     636 ncks -3 -O --no_abc --ppc default=1 dyna_grid_${var}.nc new2_dyna_grid_${var}.nc 
     637 ncks -3 dyna_grid_${var}.nc new3_dyna_grid_${var}.nc 
     638 ncks -3 --no_abc -A -d time_counter,0,71 new2_dyna_grid_${var}.nc new3_dyna_grid_${var}.nc 
     639 ncks -3 --no_abc -A -d time_counter,0,37 dyna_grid_${var}.nc new3_dyna_grid_${var}.nc 
     640 nccopy -7 -c "time_counter/1,x/60,y/50,depthv/4" -d 4 new3_dyna_grid_${var}.nc new4_dyna_grid_${var}.nc 
     641done 
     642rm new[2,3]*.nc 
     643mv new4_dyna_grid_V.nc dyna_grid_V.nc 
     644 
     645for var in W 
     646do 
     647 echo ${var} 
     648 ncks -3 -O --no_abc --ppc default=1 dyna_grid_${var}.nc new2_dyna_grid_${var}.nc 
     649 ncks -3 dyna_grid_${var}.nc new3_dyna_grid_${var}.nc 
     650 ncks -3 --no_abc -A -d time_counter,0,71 new2_dyna_grid_${var}.nc new3_dyna_grid_${var}.nc 
     651 ncks -3 --no_abc -A -d time_counter,0,37 dyna_grid_${var}.nc new3_dyna_grid_${var}.nc 
     652 nccopy -7 -c "time_counter/1,x/60,y/50,depthw/4" -d 4 new3_dyna_grid_${var}.nc new4_dyna_grid_${var}.nc 
     653done 
     654rm new[2,3]*.nc 
     655mv new4_dyna_grid_W.nc dyna_grid_W.nc 
     656cd ../ 
     657fi 
     658# 
     659if [ 1 == 1 ] ; then 
     660cd WED025_v4.2_RC 
     661# WEDcmds 
     662# u10 v10 t10 precip rsds q10 slp rlds snow 
     663# WED025 starts in middle of January; need 20 days from then = 35 days = 280 records @ 3hourly 
     664# But the first 13.875 days records (111 @ 3 hourly) can be stored at minimal precision 
     665for v in u10 v10 t10 precip rsds q10 slp rlds snow 
     666do 
     667 ncks -3 -O --no_abc --ppc default=1 ${v}_JRA_y2000.nc new2_${v}_JRA_y2000.nc 
     668 ncks -3 ${v}_JRA_y2000.nc new3_${v}_JRA_y2000.nc 
     669 ncks -3 --no_abc -A -d time,0,110 new2_${v}_JRA_y2000.nc new3_${v}_JRA_y2000.nc 
     670 nccopy -7 -c "time/1,longitude/64,latitude/64" -d 4 new3_${v}_JRA_y2000.nc new4_${v}_JRA_y2000.nc 
     671done 
     672rm new[2,3]*.nc 
     673# 
     674for v in u10 v10 t10 precip rsds q10 slp rlds snow 
     675do 
     676 mv new4_${v}_JRA_y2000.nc ${v}_JRA_y2000.nc 
     677done 
     678# 
     679cd ../ 
     680fi 
     681}}} 
     682 
     683With this secondary manipulation the overall volumes reduces from 4.5 GB to 3.7GB and there is no change in SETTE results when compared with results using the r4.2_RC_FULL set 
     684 
     685 
    517686=== Documentation updates 
    518687