Opened 11 years ago
Closed 11 years ago
#156 closed enhancement (wontfix)
Handle more complexity in cards
Reported by: | omamce | Owned by: | sdipsl |
---|---|---|---|
Priority: | major | Milestone: | libIGCM_v2.1 consolidation |
Component: | system | Version: | 2.0 |
Keywords: | Cc: |
Description
To easily change the sea-ice model between LIM2 and LIM3, I whish I could have some card with the following syntax :
[OutputFiles] List= (${config_UserChoices_JobName}_1m_icemod.nc, ${R_OUT_ICE_O_M}/${PREFIX}_1M_icemod.nc, Post_1M_icemod_${SEAICE_MODEL} ), \ (${config_UserChoices_JobName}_1d_icemod.nc, ${R_OUT_ICE_O_D}/${PREFIX}_1D_icemod.nc, Post_1D_icemod_${SEAICE_MODEL} )
But variable $SEAICE_MODEL is not always interpreted in some functions. Finding the section Post_1M_icemod_LIM3 (for instance) in the remaning of the card fails.
I propose a change in IGCM_card_DefineArrayFromOption : adding an 'eval' to the defition of the array, but protecting the `"' to continue to allow syntax like ICE= ("" ,"" ) to be handled correctly.
p86mart@Curie-[70]-10:07:55-(Work)/.../libIGCM/libIGCM_card:svn diff libIGCM_card.ksh Index: libIGCM_card.ksh =================================================================== --- libIGCM_card.ksh (revision 894) +++ libIGCM_card.ksh (working copy) @@ -138,7 +138,7 @@ typeset name=${name1%%.*}_${2}_${3} eval unset ${name} eval ${name}[0]=${NULL_STR} - set +A ${name} -- $( gawk -f ${libIGCM}/libIGCM_card/IGCM_card_PrintOption.awk -- "$@" | gawk -- 'BEGIN {FS="[() ,]+"} {for (i=2; i <= NF-1; i++) printf("%s ",$i)}' ) + eval set +A ${name} -- $( gawk -f ${libIGCM}/libIGCM_card/IGCM_card_PrintOption.awk -- "$@" | sed 's/"/\\"/g' | gawk -- 'BEGIN {FS="[() ,]+"} {for (i=2; i <= NF-1; i++) printf("%s ",$i)}' ) else echo IGCM_debug_Print 1 "--Error--> IGCM_card_DefineArrayFromOption $@"
This has been successfully tested on a run, but not on a full post-processing yet.
Attachments (1)
Change History (3)
Changed 11 years ago by omamce
comment:1 Changed 11 years ago by sdipsl
- Owner changed from somebody to sdipsl
- Status changed from new to assigned
comment:2 Changed 11 years ago by sdipsl
- Resolution set to wontfix
- Status changed from assigned to closed
Note: See
TracTickets for help on using
tickets.
After a discussion with Olivier it seems a better idea to have those kind of things handled by ins_job.
lim2 or lim3 is already specified in config.card and is determined by the compilation phase.
this has to be done together with the compilation review.