wiki:SmoothFile

Smoothfiles

SmoothFiles section is a "get files" section with frequency informations for all initial map and files get in libIGCM configurations.

It is an optionnal section.

All frequency values are in CumulPeriod unit. See section SmoothModulo below for usage of frequency vector.

How to use Smoothfile section ?

lmdz.card :

[SmoothFiles]
52	# With AR5 aerosols (including ASSO4M(=SO4), CSSO4M, AIBCM, ASBCM, AIPOMM, ASPOMM, ASSSM, CSSSM, SSSSM, CIDUSTM)
53	# With AR5 ozone(tropo + strato from LMDZOR-INCA-REPROBUS simulations)
54	List=   (${R_BC}/ATM/${config_UserChoices_TagName}/${RESOL_ATM}/AR5/HISTORIQUE/aerosols_11YearsClim_${year}_v3.nc, aerosols${year}.nc, 1:12:), \
55	        (${R_BC}/ATM/${config_UserChoices_TagName}/${RESOL_ATM}/AR5/HISTORIQUE/climoz_LMDZ_${year}_v2.nc,          climoz_LMDZ.nc,     1:12:)

orchidee.card :

[SmoothFiles]
17	List=(${R_BC}/SRF/${config_UserChoices_TagName}/PFTmap_1850to2005_AR5_LUHa.rc2/PFTmap_IPCC_${year_p1}.nc, PFTmap.nc, 12:12:)

History for versions of Smootfile function

Original branch

SmoothFiles branch begin at commit #6 see first import in changset [8]. It use a new function IGCM_SmoothModulo to analyse A string of min max and modulo like definition of Scilab vectors.

IGCM_SmoothModulo StringModulo value

Merge in the trunk

Original branch has been merged in trunk in changset [247].

Change the test for re-submission

Changeset [260] :

  • Minor changes regarding smooth files handling
  • We do not want to erase them between gcm execution
  • We use that for aerosols forcing and ozone forcing updates
    385	 	                if [ X${ret} = Xtrue ] ; then 
     	385	                if ( [ X${ret} = Xtrue ] || [ ${Period} -eq 1 ] ) ; then 
    

This force the file to be get in the fist Period of a re-submission.

Changeset [409] :
For Smooth file, first access is always true for Period=1. Get Files when SmoothMin<=CumulPeriod<=SmoothMax and modulo [min]:[modulo:][max] is true. [BR] see ticket #44

384	 	                if ( [ X${ret} = Xtrue ] || [ ${Period} -eq 1 ] ) ; then 
 	387	                if ( [ X${ret} = Xtrue ] || ( [ ${Period} -eq 1 ] && [ ${CumulPeriod} -ge ${SmoothMin} ] && [ ${CumulPeriod} -le ${SmoothMax} ) ) ; then 

This force the file to be get in the fist Period of a re-submission AND SmoothMin <= CumulPeriod <= SmoothMax.

Bug on re-submission

Changeset [412] :

 386                            eval ret=$( IGCM_SmoothModulo ${SmoothDef} ${CumulPeriod} ) 
 387	         	        if ( [ X${ret} = Xtrue ] || ( [ ${Period} -eq 1 ] && [ ${CumulPeriod} -ge ${SmoothMin} ] && [ ${CumulPeriod} -le ${SmoothMax} ) ) ; then 
 	391	                aux=$( IGCM_SmoothModulo ${SmoothDef} ${CumulPeriod} ) 
 	392	                j=1 
 	393	                for val in ${aux} ; do 
 	394	                    [ ${j} -eq 1 ] && SmoothMin=${val} 
 	395	                    [ ${j} -eq 2 ] && SmoothMax=${val} 
 	396	                    [ ${j} -eq 3 ] && ret=${val} 
 	397	                    (( j=j+1 )) 
 	398	                done 
 	399	                if ( [ X${ret} = Xtrue ] || ( [ ${Period} -eq 1 ] && [ ${CumulPeriod} -ge ${SmoothMin} ] && [ ${CumulPeriod} -le ${SmoothMax} ] ) ) ; then 

You should only use this version.

SmoothModulo function

Definition of Smooth modulo function

Function IGCM_SmoothModulo analyses a string of "min max and modulo" like definition of Scilab vectors.

usage :

IGCM_SmoothModulo StringModulo value 

StringModulo : A string of min:module:max like definition of Scilab vectors.

[min]:[modulo:][max] 

where :

  • [] value are optionnals;
  • empty min equal 1
  • empty max equal infinity
  • modulo not given or empty equal 1
  • empty string or just ':' equal always.

Then all is optionnal (but only one ':' that means "always").

Example :

  • 1:12: for a 1M PeriodLength means in all january only through the end (defaut end corresponds to DateEnd)
  • 1:12:124 for a 1M PeriodLength meansthen same, but only if CumulPeriod < 125.
  • :12:124 is the same a previous (default init is 1).
  • 1:124 means always before CumulPeriod < 125.
  • : always. You can use BoundaryFiles section to do this.
Last modified 13 years ago Last modified on 05/09/11 13:52:57